<template>
  <slider min="0" max="1" step="0.01" v-model="volume">
    <view>Volume: {{ (volume * 100).toFixed(0) }}%</view>
  </slider>
</template>

<script>
export default {
  props: {
    value: {
      type: Number,
      required: true,
    },
  },
  computed: {
    volume: {
      get() {
        return this.value;
      },
      set(val) {
        this.$emit('input', val);
      },
    },
  },
};
</script>

<style>
/* 样式定义 */
</style>
